
qmad.br_navigator = navigator.userAgent.indexOf("Netscape") + 1;
qmad.br_version = parseFloat(navigator.vendorSub);
qmad.br_oldnav6 = qmad.br_navigator && qmad.br_version < 7;
if (!qmad.br_oldnav6) {
	if (!qmad.ibullets) {
		qmad.ibullets = new Object();
	}
	if (qmad.bvis.indexOf("qm_ibullets_active(o,false);") == -1) {
		qmad.bvis += "qm_ibullets_active(o,false);";
		qmad.bhide += "qm_ibullets_active(a,1);";
		if (window.attachEvent) {
			window.attachEvent("onload", qm_ibullets_init);
		} else {
			if (window.addEventListener) {
				window.addEventListener("load", qm_ibullets_init, 1);
			}
		}
		if (window.attachEvent) {
			document.attachEvent("onmouseover", qm_ibullets_hover_off);
		} else {
			if (window.addEventListener) {
				document.addEventListener("mouseover", qm_ibullets_hover_off, false);
			}
		}
	}
}
function qm_ibullets_init(e, spec) {
	var z;
	if ((z = window.qmv) && (z = z.addons) && (z = z.item_bullets) && (!z["on" + qmv.id] && z["on" + qmv.id] != undefined && z["on" + qmv.id] != null)) {
		return;
	}
	qm_ts = 1;
	var q = qmad.ibullets;
	var a, b, r, sx, sy;
	z = window.qmv;
	for (i = 0; i < 10; i++) {
		if (!(a = document.getElementById("qm" + i)) || (!isNaN(spec) && spec != i)) {
			continue;
		}
		var ss = qmad[a.id];
		if (ss && (ss.ibullets_main_image || ss.ibullets_sub_image)) {
			q.mimg = ss.ibullets_main_image;
			if (q.mimg) {
				q.mimg_a = ss.ibullets_main_image_active;
				if (!z) {
					qm_ibullets_preload(q.mimg_a);
				}
				q.mimg_h = ss.ibullets_main_image_hover;
				if (!z) {
					qm_ibullets_preload(q.mimg_a);
				}
				q.mimgwh = eval("new Array(" + ss.ibullets_main_image_width + "," + ss.ibullets_main_image_height + ")");
				r = q.mimgwh;
				if (!r[0]) {
					r[0] = 9;
				}
				if (!r[1]) {
					r[1] = 6;
				}
				sx = ss.ibullets_main_position_x;
				sy = ss.ibullets_main_position_y;
				if (!sx) {
					sx = 0;
				}
				if (!sy) {
					sy = 0;
				}
				q.mpos = eval("new Array('" + sx + "','" + sy + "')");
				q.malign = eval("new Array('" + ss.ibullets_main_align_x + "','" + ss.ibullets_main_align_y + "')");
				r = q.malign;
				if (!r[0]) {
					r[0] = "right";
				}
				if (!r[1]) {
					r[1] = "center";
				}
			}
			q.simg = ss.ibullets_sub_image;
			if (q.simg) {
				q.simg_a = ss.ibullets_sub_image_active;
				if (!z) {
					qm_ibullets_preload(q.simg_a);
				}
				q.simg_h = ss.ibullets_sub_image_hover;
				if (!z) {
					qm_ibullets_preload(q.simg_h);
				}
				q.simgwh = eval("new Array(" + ss.ibullets_sub_image_width + "," + ss.ibullets_sub_image_height + ")");
				r = q.simgwh;
				if (!r[0]) {
					r[0] = 6;
				}
				if (!r[1]) {
					r[1] = 9;
				}
				sx = ss.ibullets_sub_position_x;
				sy = ss.ibullets_sub_position_y;
				if (!sx) {
					sx = 0;
				}
				if (!sy) {
					sy = 0;
				}
				q.spos = eval("new Array('" + sx + "','" + sy + "')");
				q.salign = eval("new Array('" + ss.ibullets_sub_align_x + "','" + ss.ibullets_sub_align_y + "')");
				r = q.salign;
				if (!r[0]) {
					r[0] = "right";
				}
				if (!r[1]) {
					r[1] = "middle";
				}
			}
			q.type = ss.ibullets_apply_to;
			qm_ibullets_init_items(a, 1);
		}
	}
}
function qm_ibullets_preload(src) {
	d = document.createElement("DIV");
	d.style.display = "none";
	d.innerHTML = "<img src=" + src + " width=1 height=1>";
	document.body.appendChild(d);
}
function qm_ibullets_init_items(a, main) {
	var q = qmad.ibullets;
	var aa, pf;
	aa = a.childNodes;
	for (var j = 0; j < aa.length; j++) {
		if (aa[j].tagName == "A") {
			if (window.attachEvent) {
				aa[j].attachEvent("onmouseover", qm_ibullets_hover);
			} else {
				if (window.addEventListener) {
					aa[j].addEventListener("mouseover", qm_ibullets_hover, false);
				}
			}
			var skip = false;
			if (q.type != "all") {
				if (q.type == "parent" && !aa[j].cdiv) {
					skip = true;
				}
				if (q.type == "non-parent" && aa[j].cdiv) {
					skip = true;
				}
			}
			if (!skip) {
				if (main) {
					pf = "m";
				} else {
					pf = "s";
				}
				if (q[pf + "img"]) {
					var ii = document.createElement("IMG");
					ii.setAttribute("src", q[pf + "img"]);
					ii.setAttribute("width", q[pf + "imgwh"][0]);
					ii.setAttribute("height", q[pf + "imgwh"][1]);
					ii.style.borderWidth = "0px";
					ii.style.position = "absolute";
					var ss = document.createElement("SPAN");
					var s1 = ss.style;
					s1.display = "block";
					s1.position = "relative";
					s1.fontSize = "1px";
					s1.lineHeight = "0px";
					ss.ibhalign = q[pf + "align"][0];
					ss.ibvalign = q[pf + "align"][1];
					ss.ibiw = q[pf + "imgwh"][0];
					ss.ibih = q[pf + "imgwh"][1];
					ss.ibposx = q[pf + "pos"][0];
					ss.ibposy = q[pf + "pos"][1];
					qm_ibullets_position(aa[j], ss);
					ss.appendChild(ii);
					aa[j].qmibullet = aa[j].insertBefore(ss, aa[j].firstChild);
					aa[j]["qmibullet" + pf + "a"] = q[pf + "img_a"];
					aa[j]["qmibullet" + pf + "h"] = q[pf + "img_h"];
					aa[j].qmibulletorig = q[pf + "img"];
					ss.setAttribute("qmvbefore", 1);
					ss.setAttribute("isibullet", 1);
					if (aa[j].className.indexOf("qmactive") + 1) {
						qm_ibullets_active(aa[j]);
					}
				}
			}
			if (aa[j].cdiv) {
				new qm_ibullets_init_items(aa[j].cdiv);
			}
		}
	}
}
function qm_ibullets_position(a, b) {
	if (b.ibhalign == "right") {
		b.style.left = (a.offsetWidth + parseInt(b.ibposx) - b.ibiw) + "px";
	} else {
		if (b.ibhalign == "center") {
			b.style.left = (parseInt(a.offsetWidth / 2) - parseInt(b.ibiw / 2) + parseInt(b.ibposx)) + "px";
		} else {
			b.style.left = b.ibposx + "px";
		}
	}
	if (b.ibvalign == "bottom") {
		b.style.top = (a.offsetHeight + parseInt(b.ibposy) - b.ibih) + "px";
	} else {
		if (b.ibvalign == "middle") {
			b.style.top = parseInt((a.offsetHeight / 2) - parseInt(b.ibih / 2) + parseInt(b.ibposy)) + "px";
		} else {
			b.style.top = b.ibposy + "px";
		}
	}
}
function qm_ibullets_hover(e, targ) {
	e = e || window.event;
	if (!targ) {
		var targ = e.srcElement || e.target;
		while (targ.tagName != "A") {
			targ = targ[qp];
		}
	}
	var ch = qmad.ibullets.lasth;
	if (ch && ch != targ) {
		qm_ibullets_hover_off(new Object(), ch);
	}
	if (targ.className.indexOf("qmactive") + 1) {
		return;
	}
	var wo = targ.qmibullet;
	var ma = targ.qmibulletmh;
	var sa = targ.qmibulletsh;
	if (wo && (ma || sa)) {
		var ti = ma;
		if (sa && sa != undefined) {
			ti = sa;
		}
		if (ma && ma != undefined) {
			ti = ma;
		}
		wo.firstChild.src = ti;
		qmad.ibullets.lasth = targ;
	}
	if (e) {
		qm_kille(e);
	}
}
function qm_ibullets_hover_off(e, o) {
	if (!o) {
		o = qmad.ibullets.lasth;
	}
	if (o && o.className.indexOf("qmactive") == -1) {
		if (o.firstChild && o.firstChild.getAttribute && o.firstChild.getAttribute("isibullet")) {
			o.firstChild.firstChild.src = o.qmibulletorig;
		}
	}
}
function qm_ibullets_active(a, hide) {
	var wo = a.qmibullet;
	var ma = a.qmibulletma;
	var sa = a.qmibulletsa;
	if (!hide && a.className.indexOf("qmactive") == -1) {
		return;
	}
	if (hide && a.idiv) {
		var o = a.idiv;
		if (o && o.qmibulletorig) {
			if (o.firstChild && o.firstChild.getAttribute && o.firstChild.getAttribute("isibullet")) {
				o.firstChild.firstChild.src = o.qmibulletorig;
			}
		}
	} else {
		qm_ibullets_wait_position(a);
		if (wo && (ma || sa)) {
			var ti = ma;
			if (sa && sa != undefined) {
				ti = sa;
			}
			if (ma && ma != undefined) {
				ti = ma;
			}
			wo.firstChild.src = ti;
		}
	}
}
function qm_ibullets_wait_position(a) {
	if (a) {
		qmad.ibullets.a = a;
	} else {
		a = qmad.ibullets.a;
	}
	if (a.cdiv) {
		var aa = a.cdiv.childNodes;
		for (var i = 0; i < aa.length; i++) {
			if (aa[i].tagName == "A" && aa[i].qmibullet) {
				if (!aa[i].offsetWidth) {
					setTimeout("qm_ibullets_wait_position()", 10);
					return;
				}
				qm_ibullets_position(aa[i], aa[i].qmibullet);
			}
		}
	}
}

